package net.sunbeta.test.guice;

import com.google.inject.Guice;
import com.google.inject.Injector;

public class UserAppFactory {

	private Injector injector;
	
	public UserAppFactory() {
		injector = createInjector();
	}
	
	public <T> T create(Class<T> c) {
		return injector.getInstance(c);
	}

	private Injector createInjector() {
		return Guice.createInjector(new UserAppModule());
	}
}
